package cn.javacms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.javacms.service.IJavaCmsService;

@Controller
public class JavaCmsController {
	
	@Autowired
	private IJavaCmsService javaCmsService;
	
	@RequestMapping("/hello")
	 public ModelAndView helloWorld() {
	  String message = "Hello World, Spring 3.0!";
	  System.out.println(message);
	  javaCmsService.save();
	  return new ModelAndView("hello", "message", message);
	 }

}
